function A() {
    return new Promise((resolve, rejecr) => {
        setTimeout(() => {
        console.log('异步A')
        resolve()
    }, 1000)
    })
    
}
function B() {
    console.log('B')
}

A().then(() => B()) 